package com.sola_aventuro.adventure.gui;

import java.awt.GridLayout;

import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.SpinnerNumberModel;

import com.sola_aventuro.adventure.gui.helpers.Strings;
import javax.swing.BorderFactory;
import javax.swing.border.TitledBorder;

public class LinkPanel extends JPanel {

	private Strings strings = new Strings();
	private static final long serialVersionUID = 1L;
	private JLabel jLabel = null;
	private JLabel jLabel1 = null;
	private JLabel jLabel2 = null;
	private JSpinner jSpinner = null;
	private JComboBox jComboBox = null;
	private JTextField jTextField = null;

	/**
	 * This is the default constructor
	 */
	public LinkPanel() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		GridLayout gridLayout = new GridLayout();
		gridLayout.setRows(3);
		gridLayout.setHgap(3);
		gridLayout.setVgap(3);
		gridLayout.setColumns(2);
		GridLayout gridLayout1 = new GridLayout();
		gridLayout1.setRows(3);
		gridLayout1.setHgap(3);
		gridLayout1.setVgap(3);
		gridLayout1.setColumns(2);
		jLabel2 = new JLabel();
		jLabel2.setText(strings._("condition_requeriment"));
		jLabel1 = new JLabel();
		jLabel1.setText(strings._("condition"));
		jLabel = new JLabel();
		jLabel.setText(strings._("target"));
		this.setLayout(gridLayout);
		this.setSize(300, 87);
		this.setBorder(BorderFactory.createTitledBorder(null, strings._("link"), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
		this.add(jLabel, null);
		this.add(getJSpinner(), null);
		this.add(jLabel1, null);
		this.add(getJComboBox(), null);
		this.add(jLabel2, null);
		this.add(getJTextField(), null);
	}

	/**
	 * This method initializes jSpinner	
	 * 	
	 * @return javax.swing.JSpinner	
	 */
	private JSpinner getJSpinner() {
		if (jSpinner == null) {
			jSpinner = new JSpinner(new SpinnerNumberModel(0, 0, 200, 1));
		}
		return jSpinner;
	}

	/**
	 * This method initializes jComboBox	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBox() {
		if (jComboBox == null) {
			jComboBox = new JComboBox(strings.getConditionTypeList());
		}
		return jComboBox;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
		}
		return jTextField;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
